// gameplay.scss
.carousel-container {
  position: relative;
  overflow: hidden;

  width: 1300px; // 增加最大宽度限制

  padding: 0 10px;
}

.carousel-content {
  display: flex;

  gap: 50px;
  height: 200px; // 根据需求调整
  will-change: transform;
}

.carousel-item {
  flex: 0 0 auto; // 改为自动伸缩
  transition: transform 0.3s;
  position: relative; // 新增定位上下文
  height: 100%;

  img {
    width: 110%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }
  // 黑色蒙层效果
  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; // 防止遮挡点击事件
  }

  &:hover::after {
    opacity: 1;
  }
}

.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  border: none;
  background: transparent;
  opacity: 0; // 默认透明
  padding: 15px;
  font-size: 40px;
  cursor: pointer;
  transition: opacity 0.3s;
  color: #ccc;
  z-index: 2;
  .carousel-container:hover & {
    opacity: 1;
  }
  &:hover {
    color: #fff;
  }

  &.left {
    left: -10px;
  }

  &.right {
    right: -20px;
  }
}
